<?php
use App\Utils;
?>
@extends('layouts.master3')
@section('title')
{{$user->name."-千里码"}}
@stop

@section('css')
<link href="/css/people.css" rel="stylesheet">
@stop
@section('content')
<!--common header E  -->
<div class="contain main">
    <div class="user_info">
        <div class="user_info_head">
                <div class="title_sec"><span class="name">{{$user->name}}</span> ，<span class="motto" title="">{{$user->introduce}}</span></div>
        </div>
        <!-- 用户信息 基本信息 -->
        <div class="user_info_contain">
            <div class="user_avatar">
                <img src="{{$user->avatar->url()}}">
            </div>
            <div class="user_detail">
                <div class="user_detail_list"><i class="iconfont">&#xe608;</i><span class="company">{{$user->company}}</span><span class="work">{{$user->title}}</span></div>
                <div class="user_detail_list"><i class="iconfont pos">&#xe60d;</i><span class="pos">{{$user->location}}</span></div>

            </div>
        </div>
        <!-- 用户荣誉 -->
        <div class="user_badges">
            徽章:
<?php
foreach($medals as $m)
{
?>
            <i class="iconfont" title="{{$m->title}}">{{$m->class}}</i>
<?php
}
?>
            <div class="fr">
                <!--<a class="u_btn cereforyou" data-flag="false" data-id="">关注他</a>
-->
            <?php 
                if($user->id!=Auth::user()->id)
                {
                    ?>
                <a class="ql_send_letter" href="" data-toggle="modal" data-target="#myModal" title="给他/她发私信">发私信</a>

                <?php
                }
                else{
                    ?>
                    <a class="u_btn fr" href="/u/update">完善资料</a> 
                    <?php
                }
            ?>
            </div>
        </div>
        <!--  用户task -->
        <div class="user_task">
            <div class="fl" data-id="{{$user->id}}" data-name="{{$user->name}}">
                <a class="home active" onclick="getRequest('index',this)"><i class="iconfont">&#xe601;</i></a>
                <a class="user_list" href="/u/{{Utils::id2url($user->id)}}" target="_blank">技能树</a>
<!--
                <a class="user_list" onclick="getRequest('kuibu',this)" target="_blank">跬步</a>
-->
                <a class="user_list" href="/u/{{Utils::id2url($user->id)}}/log" target="_blank">跬步</a>
                <a class="user_list" onclick="getRequest('question',this)">提问</a>
                <a class="user_list" onclick="getRequest('answer',this)">回答</a>
                <a class="user_list" onclick="getRequest('offer',this)">贡献题目</a>
               
                
            
                
            </div>
            <!-- -->
        </div>
        <div class="user_sec_warp">
            <div class="user_sec"> 
                <div class="user_sec_head pd10 bor_b">最新动态</div>
                <div class="user_contain pd10">

                </div> 
            </div>
        </div>
        <div class="get-more" style="display:none;" data-flag="false">
            <a href="javascript:;">加载更多</a>
        </div>
    </div>


    <!-- 右边板块-->
    <div class="right_sidebar fr">
        <div class="follow_bar clear">
            <a class="follow_num" href="">
                <strong>{{$user->score/100}}</strong>
                <span class="normal">分数</span>
            </a>
            <a class="follower" href="">
				<strong>
<?php
				$s=$user->score/100;
				echo $user->step+Utils::score2step($s);
?>
</strong>
                <span class="normal">跬步</span>
            </a>
        </div>
		<div class="side_sec">
		</div>
<!--
        <div class="side_sec">
            <div class="side_sec_title">共关注了<a class="" href="">9个任务</a></div>
            <div class="side_sec_task">
                <a class="side_sec_task_item" href="" title="扫地机器人">33</a>
            </div>
        </div>
-->
<!--
        <div class="side_sec">
            <div class="">
                <span class="normal">个人主页被<strong>99</strong>人浏览</span>
            </div>
        </div>

-->
<?php if (false&&$jobs_cnt>0) echo '<div class="side_sec"><a href="/invitation" class="invite-count">已收到'.$jobs_cnt.'次邀请</a></div>';?>
        <div class="side_sec">
            <span class="normal"><a href="http://www.qlcoder.com/help#opinion">建议反馈</a> ©2016千里码</span>
        </div>
    </div>

</div>

<!-- 发私信弹窗  -->
<div class="ql_letter_modal modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <input type="hidden" data-id="{{$user->id}}" id="dataobj">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">发送私信</h4>
            </div>
            <div class="modal-body">
                <dl>
                    <dt class="send_label">
                        <label>发给:</label>
                    </dt>
                    <dd>
                        <div class="send_name"><input type="text" placeholder="{{$user->name}}" value="{{$user->name}}" disabled="disabled"></div>
                    </dd>
                    <dt class="send_label">
                        <label>内容:</label>
                    </dt>
                    <dd class="ml">
                        <div class="send_editor">
                            <textarea class="editor_content" style="font-weight: normal; height: 22px;"></textarea>
                        </div>
                    </dd>
                </dl>
            </div>
            <div class="modal-footer">
                <a href="javascript:;" class="close_btn" data-dismiss="modal">取消</a>
                <button type="button" class="btn btn-primary" id="sendTo">发送</button>
            </div>
        </div>
    </div>
</div>
<!--私信发送结果-->
<div class="alert alert-warning alert-dismissible none" role="alert"style="position: fixed;top: 50%;left: 50%;width: 400px;text-align: center;margin-left: -200px;margin-top: -26px;">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <strong>发送成功!</strong>
</div>
<img class="loadding_img none" src="/img/loadding.gif" alt="正在加载中" style="display: block;position: fixed;top: 50%;left: 50%;margin-top: -10px;margin-left: -50px;">
@stop
@section('js')
<script src="/js/Jcenter.js"></script>
@stop
